- Author:
- Soroush Safaei <ssaf006@aucklanduni.ac.nz>
- Date:
- 2018-06-21 17:32:55+12:00
- Desc:
- adding new model
- Permanent Source URI:
- https://models.fieldml.org/workspace/43b/rawfile/407bbf87831b4f602c138839d0fa7874993b5ff4/BG Tutorial Fluid Systems/3-Capillaries.cellml
<?xml version='1.0'?>
<model name="my_model" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#" xmlns:xlink="http://www.w3.org/1999/xlink">
<import xlink:href="Units.cellml">
<units name="mm" units_ref="mm"/>
<units name="mm3" units_ref="mm3"/>
<units name="mm3_per_s" units_ref="mm3_per_s"/>
<units name="J_per_s" units_ref="J_per_s"/>
<units name="gJ_per_m3" units_ref="gJ_per_m3"/>
<units name="gJ_s_per_m3" units_ref="gJ_s_per_m3"/>
<units name="eJ_per_m6" units_ref="eJ_per_m6"/>
<units name="eJ_s_per_m6" units_ref="eJ_s_per_m6"/>
<units name="eJ_s2_per_m6" units_ref="eJ_s2_per_m6"/>
<units name="pJ_s2_per_m5" units_ref="pJ_s2_per_m5"/>
</import>
<component name="main">
<variable name="t" units="second"/>
<variable initial_value="1.0" name="period" units="second"/>
<!-- State variables-->
<variable initial_value="0" name="q_in" units="mm3"/>
<variable initial_value="0" name="q_out" units="mm3"/>
<variable initial_value="0" name="q_1" units="mm3"/>
<variable initial_value="0" name="q_2" units="mm3"/>
<variable initial_value="0" name="q_3" units="mm3"/>
<variable initial_value="0" name="q_4" units="mm3"/>
<variable initial_value="0" name="q_5" units="mm3"/>
<variable name="v_in" units="mm3_per_s"/>
<variable initial_value="0" name="v_1" units="mm3_per_s"/>
<variable initial_value="0" name="v_2" units="mm3_per_s"/>
<variable initial_value="0" name="v_3" units="mm3_per_s"/>
<variable initial_value="0" name="v_4" units="mm3_per_s"/>
<variable initial_value="0" name="v_5" units="mm3_per_s"/>
<variable name="u_1" units="gJ_per_m3"/>
<variable name="u_2" units="gJ_per_m3"/>
<variable name="u_3" units="gJ_per_m3"/>
<variable name="u_4" units="gJ_per_m3"/>
<variable name="u_5" units="gJ_per_m3"/>
<variable initial_value="0" name="u_out" units="gJ_per_m3"/>
<variable name="p_in" units="J_per_s"/>
<variable name="p_out" units="J_per_s"/>
<variable name="p_sys" units="J_per_s"/>
<variable name="p_dis" units="J_per_s"/>
<!-- Constitutive parameters-->
<variable initial_value="0.004e-9" name="mu" units="gJ_s_per_m3"/>
<variable initial_value="1050e-15" name="rho" units="pJ_s2_per_m5"/>
<variable initial_value="20" name="l_1" units="mm"/>
<variable initial_value="20" name="l_2" units="mm"/>
<variable initial_value="20" name="l_3" units="mm"/>
<variable initial_value="2.0" name="r_1" units="mm"/>
<variable initial_value="0.5" name="r_2" units="mm"/>
<variable initial_value="1.5" name="r_3" units="mm"/>
<variable initial_value="0.5" name="h_1" units="mm"/>
<variable initial_value="0.5" name="h_2" units="mm"/>
<variable initial_value="0.5" name="h_3" units="mm"/>
<variable initial_value="600000e-9" name="Em_1" units="gJ_per_m3"/>
<variable initial_value="600000e-9" name="Em_2" units="gJ_per_m3"/>
<variable initial_value="600000e-9" name="Em_3" units="gJ_per_m3"/>
<variable name="E_1" units="eJ_per_m6"/>
<variable initial_value="1e-3" name="E_2" units="eJ_per_m6"/>
<variable name="E_3" units="eJ_per_m6"/>
<variable initial_value="1e-3" name="E_4" units="eJ_per_m6"/>
<variable name="E_5" units="eJ_per_m6"/>
<variable name="R_1" units="eJ_s_per_m6"/>
<variable name="R_2" units="eJ_s_per_m6"/>
<variable name="R_3" units="eJ_s_per_m6"/>
<variable name="R_4" units="eJ_s_per_m6"/>
<variable name="R_5" units="eJ_s_per_m6"/>
<variable name="I_1" units="eJ_s2_per_m6"/>
<variable name="I_2" units="eJ_s2_per_m6"/>
<variable name="I_3" units="eJ_s2_per_m6"/>
<variable name="I_4" units="eJ_s2_per_m6"/>
<variable name="I_5" units="eJ_s2_per_m6"/>
<variable initial_value="20.93" name="a1" units="dimensionless"/>
<variable initial_value="0.199" name="b1" units="dimensionless"/>
<variable initial_value="0.08563" name="c1" units="dimensionless"/>
<variable initial_value="4" name="n_2" units="dimensionless"/>
<variable initial_value="4" name="n_4" units="dimensionless"/>
<!-- Inlet flow-->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<ci>v_in</ci>
<apply>
<times/>
<ci>a1</ci>
<apply>
<exp/>
<apply>
<minus/>
<apply>
<power/>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>t</ci>
<apply>
<times/>
<ci>period</ci>
<apply>
<floor/>
<apply>
<divide/>
<ci>t</ci>
<ci>period</ci>
</apply>
</apply>
</apply>
</apply>
<ci>b1</ci>
</apply>
<ci>c1</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
</apply>
<!-- Constitutive relations-->
<apply>
<eq/>
<ci>E_1</ci>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">2</cn>
<ci>Em_1</ci>
<ci>h_1</ci>
</apply>
<apply>
<times/>
<cn cellml:units="dimensionless">3</cn>
<pi/>
<apply>
<power/>
<ci>r_1</ci>
<cn cellml:units="dimensionless">3</cn>
</apply>
<ci>l_1</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>E_3</ci>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">2</cn>
<ci>Em_2</ci>
<ci>h_2</ci>
</apply>
<apply>
<times/>
<cn cellml:units="dimensionless">3</cn>
<pi/>
<apply>
<power/>
<ci>r_2</ci>
<cn cellml:units="dimensionless">3</cn>
</apply>
<ci>l_2</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>E_5</ci>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">2</cn>
<ci>Em_3</ci>
<ci>h_3</ci>
</apply>
<apply>
<times/>
<cn cellml:units="dimensionless">3</cn>
<pi/>
<apply>
<power/>
<ci>r_3</ci>
<cn cellml:units="dimensionless">3</cn>
</apply>
<ci>l_3</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>R_1</ci>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">8</cn>
<ci>mu</ci>
<ci>l_1</ci>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_1</ci>
<cn cellml:units="dimensionless">4</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>R_2</ci>
<apply>
<divide/>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">8</cn>
<ci>mu</ci>
<ci>l_2</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_2</ci>
<cn cellml:units="dimensionless">4</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>R_3</ci>
<apply>
<divide/>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">8</cn>
<ci>mu</ci>
<ci>l_2</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_2</ci>
<cn cellml:units="dimensionless">4</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>R_4</ci>
<apply>
<divide/>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">8</cn>
<ci>mu</ci>
<ci>l_3</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_3</ci>
<cn cellml:units="dimensionless">4</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>R_5</ci>
<apply>
<divide/>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">8</cn>
<ci>mu</ci>
<ci>l_3</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_3</ci>
<cn cellml:units="dimensionless">4</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>I_1</ci>
<apply>
<divide/>
<apply>
<times/>
<ci>rho</ci>
<ci>l_1</ci>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_1</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>I_2</ci>
<apply>
<divide/>
<apply>
<divide/>
<apply>
<times/>
<ci>rho</ci>
<ci>l_2</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_2</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>I_3</ci>
<apply>
<divide/>
<apply>
<divide/>
<apply>
<times/>
<ci>rho</ci>
<ci>l_2</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_2</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>I_4</ci>
<apply>
<divide/>
<apply>
<divide/>
<apply>
<times/>
<ci>rho</ci>
<ci>l_3</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_3</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>I_5</ci>
<apply>
<divide/>
<apply>
<divide/>
<apply>
<times/>
<ci>rho</ci>
<ci>l_3</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r_3</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>u_1</ci>
<apply>
<times/>
<ci>E_1</ci>
<ci>q_1</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u_2</ci>
<apply>
<times/>
<ci>E_2</ci>
<ci>q_2</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u_3</ci>
<apply>
<times/>
<ci>E_3</ci>
<ci>q_3</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u_4</ci>
<apply>
<times/>
<ci>E_4</ci>
<ci>q_4</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>u_5</ci>
<apply>
<times/>
<ci>E_5</ci>
<ci>q_5</ci>
</apply>
</apply>
<!-- Conservation laws-->
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_in</ci>
</apply>
<ci>v_in</ci>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_1</ci>
</apply>
<apply>
<minus/>
<ci>v_in</ci>
<ci>v_1</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_2</ci>
</apply>
<apply>
<minus/>
<ci>v_1</ci>
<apply>
<times/>
<ci>n_2</ci>
<ci>v_2</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_3</ci>
</apply>
<apply>
<minus/>
<ci>v_2</ci>
<ci>v_3</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_4</ci>
</apply>
<apply>
<minus/>
<apply>
<times/>
<ci>n_4</ci>
<ci>v_3</ci>
</apply>
<ci>v_4</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_5</ci>
</apply>
<apply>
<minus/>
<ci>v_4</ci>
<ci>v_5</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_out</ci>
</apply>
<ci>v_5</ci>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_1</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>u_1</ci>
<ci>u_2</ci>
</apply>
<apply>
<times/>
<ci>R_1</ci>
<ci>v_1</ci>
</apply>
</apply>
<ci>I_1</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_2</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>u_2</ci>
<ci>u_3</ci>
</apply>
<apply>
<times/>
<ci>R_2</ci>
<ci>v_2</ci>
</apply>
</apply>
<ci>I_2</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_3</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>u_3</ci>
<ci>u_4</ci>
</apply>
<apply>
<times/>
<ci>R_3</ci>
<ci>v_3</ci>
</apply>
</apply>
<ci>I_3</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_4</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>u_4</ci>
<ci>u_5</ci>
</apply>
<apply>
<times/>
<ci>R_4</ci>
<ci>v_4</ci>
</apply>
</apply>
<ci>I_4</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v_5</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>u_5</ci>
<ci>u_out</ci>
</apply>
<apply>
<times/>
<ci>R_5</ci>
<ci>v_5</ci>
</apply>
</apply>
<ci>I_5</ci>
</apply>
</apply>
<!-- Power calculations-->
<apply>
<eq/>
<ci>p_in</ci>
<apply>
<times/>
<cn cellml:units="dimensionless" type="e-notation">1<sep/>12</cn>
<ci>u_1</ci>
<ci>v_in</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>p_out</ci>
<apply>
<times/>
<cn cellml:units="dimensionless" type="e-notation">1<sep/>12</cn>
<ci>u_out</ci>
<ci>v_5</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>p_sys</ci>
<apply>
<minus/>
<ci>p_in</ci>
<ci>p_out</ci>
</apply>
</apply>
<apply>
<eq/>
<ci>p_dis</ci>
<apply>
<times/>
<cn cellml:units="dimensionless" type="e-notation">1<sep/>12</cn>
<apply>
<plus/>
<apply>
<times/>
<ci>R_1</ci>
<apply>
<power/>
<ci>v_1</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
<apply>
<times/>
<ci>R_2</ci>
<apply>
<power/>
<ci>v_2</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
<apply>
<times/>
<ci>R_3</ci>
<apply>
<power/>
<ci>v_3</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
<apply>
<times/>
<ci>R_4</ci>
<apply>
<power/>
<ci>v_4</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
<apply>
<times/>
<ci>R_5</ci>
<apply>
<power/>
<ci>v_5</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
</apply>
</math>
</component>
</model>